import { useCallback } from 'react'
import * as echarts from 'echarts'
import ReactEcharts from 'echarts-for-react'

const ReactLineCharts = ({
    options
}) => {

    const onChartReadyCallback = useCallback((echarts) => {
        console.log('ready')
    }, [])
    return <div>
        <h2>ReactEcharts</h2>
        <ReactEcharts
            echarts={echarts}
            option={options}
            notMerge={true}
            onChartReady={onChartReadyCallback}
            style={{ height: 400, width: 600 }}
        />
    </div>
}

export default ReactLineCharts